package com.example.demo.controller;

import com.example.demo.Agency;
import com.example.demo.Task;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:龙宝
 * Date:2023-10-12
 * Time:15:22
 */

@RestController
@RequestMapping("/do")
public class UserController {

    @Autowired
    private Agency agency;

    @RequestMapping("/study")
    public void study() {
        Task proxyObject = agency.getProxyObject();
        proxyObject.Study();
       // proxyObject.HomeWork();
    }
    @RequestMapping("/homework")
    public void homework() {
        Task proxyObject = agency.getProxyObject();
        //proxyObject.Study();
        proxyObject.HomeWork();
    }

}
